Voltage Regulators

A voltage regulator maintains a constant output voltage regardless of changes in input voltage or load current. Almost every circuit needs one — from the tiny LDO on a coin battery Bluetooth module to the synchronous buck converters that power modern CPUs. Choosing between linear and switching comes down to efficiency, noise floor, required headroom, and how much heat you're willing to manage.

Linear vs. Switching Comparison

PropertyLinearSwitching
How it worksActs as variable series resistor, burns excess as heatSwitches inductor at high frequency, stores/releases energy efficiently
EfficiencyV_out/V_in × 100% (worsens with larger drop)75–95% regardless of voltage difference
Output noiseVery low (µV range with good PSRR)mV-range switching ripple + EMI
Minimum dropoutStandard: ~2V; LDO: 0.1–0.5VCan step up as well as down
ComplexityThree pins, two caps minimumController, inductor, diode, input/output caps, feedback
SizeRegulator + caps (small); heatsink may be neededInductor dominates size; overall smaller for high current
SpeedFast transient response (µs)Slower loop bandwidth (ms range)
Linear versus switching regulator energy flow Two energy-flow diagrams compare converting twelve volts at one amp to five volts at one amp. The linear regulator delivers five watts and dissipates seven watts as heat, while a ninety percent efficient switching regulator delivers five watts and loses about six tenths of a watt. Linear regulator Simple and quiet, but the voltage drop becomes heat LINEAR 12 W in 12 V × 1 A 5 V × 1 A 5 W useful 7 W heat 42% efficient Switching regulator Moves energy in pulses, then smooths the output BUCK 5.6 W in 12 V × 0.46 A 5 V × 1 A 5 W useful ≈0.6 W heat ≈90% efficient
For the same 5 V, 1 A load, a linear regulator fed from 12 V must discard 7 W as heat. A 90%-efficient buck converter draws only about 5.6 W, so roughly 0.6 W becomes heat. The switcher is more complex and noisier, but needs far less thermal management.

Linear Regulators

The regulator is a transistor in series with the load, controlled by an error amplifier that compares the output to a reference voltage and adjusts the transistor to compensate:

P_heat = (V_in − V_out) × I_load

Example: 9V in, 5V out, 500mA load
P = (9 − 5) × 0.5 = 2W → needs heatsink
Efficiency = 5/9 = 55.6%

At 12V in, 5V out, 1A load:
P = 7W → requires large heatsink
Efficiency = 5/12 = 41.7%

78xx / 79xx Fixed Output

PartVoutPolarityMin VinMax VinIout max
78055VPositive7V35V1A (TO-220), 100mA (TO-92)
78099VPositive11V35V1A
781212VPositive14V35V1A
781515VPositive17V35V1A
7905−5VNegative−7V−35V1A
7912−12VNegative−14V−35V1A
7805 Linear Regulator Circuit A standard 7805 voltage regulator circuit with input and output bypass capacitors to ground. Vin 7805 IN OUT GND 100nF 100nF 5V out GND
A standard 7805 circuit. The 100nF bypass capacitors are mandatory for stability — placed as close to the IC pins as possible.

LM317 — Adjustable 1.25V to 37V

V_out = 1.25 × (1 + R2/R1)

Standard practice: R1 = 240Ω (or 220Ω)
LM317 Adjustable Regulator Circuit An LM317 regulator with two resistors forming a voltage divider to set the output voltage. Vin LM317 IN OUT ADJ Vout R1 (240Ω) R2 (adjust) GND
The LM317 maintains a constant 1.25V between the OUT and ADJ pins. By selecting R1 and R2, this constant voltage drives a constant current through R2, setting the output voltage.
Target voltages for common R2 values (R1=240Ω):
  V_out=3.3V:  R2 = 240 × (3.3/1.25 - 1) = 394Ω → 390Ω
  V_out=5V:    R2 = 240 × (5/1.25 - 1) = 720Ω → 680Ω + trim
  V_out=9V:    R2 = 240 × (9/1.25 - 1) = 1,488Ω → 1.5kΩ
  V_out=12V:   R2 = 240 × (12/1.25 - 1) = 2,064Ω → 2.2kΩ

LDO — Low-Dropout Regulators

Classic 78xx devices need ~2V of headroom. LDOs work with much less — critical for battery-powered devices where the battery voltage drops as it discharges:

PartVoutDropoutIq (quiescent)Notes
AMS1117-3.33.3V1.1V5 mACheap, common on dev boards. High Iq — bad for battery.
LP2950-55V40 mV75 µALow noise, good for audio and RF reference
MCP1700-33023.3V178 mV1.6 µAUltra-low quiescent — ideal for battery/sleep devices
TLV1117-333.3V1.1V5 mATI version of AMS1117, interchangeable
XC6206P3323.3V200 mV @ 100mA1 µASOT-23, tiny, very low Iq. Common in portable electronics.

LDO gotcha: some are unstable with low-ESR ceramics at the output. Check the datasheet for required output capacitor ESR range — older LDOs (LP2950 family) want 1–10Ω ESR, which means electrolytic or a series resistor with the ceramic.

Switching Regulators — Key ICs

PartTypeVinVoutIoutNotes
LM2596Buck4–40V1.2–37V adj.3ASimple, slow (150kHz). Large inductor needed. Good beginner switcher.
MP1584Buck4.5–28V0.8–25V adj.3ASmall, 1.5MHz. Popular in DFRobot/generic modules.
LM2576Buck7–40V3.3/5/12/15/adj3AFixed voltage versions available. 52kHz.
MT3608Boost2–24V5–28V adj.2ACommon hobby boost module. 1.2MHz, compact.
XL6009Boost3–32V5–35V adj.4AHigher current boost, replaces MT3608 for heavier loads
TPS63020Buck-boost1.8–5.5V1.2–5V adj.2ATexas Instruments, excellent for Li-ion battery applications

Heat and Heatsinking

Thermal resistance of TO-220 package (junction to case): θjc ≈ 5°C/W
Thermal resistance to ambient without heatsink: θja ≈ 50°C/W

Max junction temperature for 78xx: 125°C
Ambient: 25°C → max power dissipation without heatsink:
  P_max = (125 − 25) / 50 = 2W

With heatsink (θja = 10°C/W):
  P_max = 100 / 10 = 10W

Always check: T_junction = T_ambient + P × θja  <  T_max

Choosing the Right Regulator

SituationBest choiceWhy
5V from 9V wall adapter, 200mA7805 linearP = (9-5)×0.2 = 0.8W — no heatsink needed, simple, quiet
5V from 12V at 1ABuck converterP = 7W in a linear — too much heat. Switcher: ~95% efficiency, minimal heat
3.3V from 3.7V LiPoLDO (MCP1700)Small dropout (needed at end of charge cycle), ultra-low Iq for battery life
Variable bench supplyLM317 + transformerClean, adjustable, low noise — classic bench supply approach
5V from 3.7V LiPo (USB output)Boost (MT3608 or XL6009)Need to step UP — only switcher can do this
Sensitive RF/audio circuitLinear with LDOSwitching noise would degrade noise floor; linear supply essential

References